/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.sinosoft.call.entity;

import com.alibaba.fastjson.JSONObject;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 *
 * @author root
 */
@Component
@RefreshScope
@ConfigurationProperties(prefix = "icccall")
public class CallIndex {

//    Logger log = LoggerFactory.getLogger(getClass());
//    
//
//    List<Map<String, String>> callindex = new ArrayList<>();
//
//    public List<Map<String, String>> getCallindex() {
//        return callindex;
//    }
//
//    public void setCallindex(List<Map<String, String>> callindex) {
//        this.callindex = callindex;
//    }
//
    
    
    
    Map<String, CallConfig> callindex = new HashMap<String, CallConfig>();

    public Map<String, CallConfig> getCallindex() {
        return callindex;
    }

    public void setCallindex(Map<String, CallConfig> callindex) {
        this.callindex = callindex;
    }
    
    
//    public List<CallConfig> getCallConfig() {
//        List<CallConfig> lc = new ArrayList<CallConfig>();
//
//        for (Map<String, String> jm : callindex) {
//            CallConfig cc = new CallConfig();
//            cc.setCallurl(jm.get("callurl"));
//            cc.setCode(jm.get("code"));
//            cc.setEndtime(jm.get("endtime"));
//            cc.setEnvironment(jm.get("environment"));
//            cc.setMenthod(jm.get("menthod"));
//            cc.setMenthodparam(jm.get("menthodparam"));
//            cc.setName(jm.get("name"));
//            cc.setNamespace(jm.get("namespace"));
//            cc.setPrintflag(jm.get("printflag"));
//            cc.setPromessage(jm.get("promessage"));
//            cc.setRequestparam(jm.get("requestparam"));
//            cc.setRequeststr(jm.get("requeststr"));
//            cc.setRequesttype(jm.get("requesttype"));
//            cc.setResponsestr(jm.get("responsestr"));
//            cc.setResponsestr1(jm.get("responsestr1"));
//            cc.setStarttime(jm.get("starttime"));
//            cc.setState(jm.get("state"));
//            lc.add(cc);
//        }
//
//        return lc;
//    }
}
